package com.jiang.demo.merge;

import com.jiang.starter.web.merge.MergeExecutor;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class DemoMergeExecutor implements MergeExecutor<Long, String> {

    @Override
    public List<String> execute(List<Long> params) {
        ArrayList<String> results = new ArrayList<>(params.size());
        params.forEach(param -> results.add("demo-merge-" + param));
        return results;
    }

    @Override
    public long period() {
        return 5000;
    }
}
